import instance from "../../utils/request";

export function findPage(searchParams) {
    //向后台发送请求，得到数据
    return instance.get(`/colour/findList`,{params: searchParams});
}


export function findlistColour() {
    return instance.get(`/colour/list`);
}



/**
 * 添加
 * @param entity
 * @returns {*}
 */
export function insert(entity){
    return instance.post(`/colour/addColour/`,entity);
}



export function deleteById(id){
    return instance.delete(`/colour/deleteById/${id}`);
}

export function batchDelete(ids) {
    return instance.delete(`/colour/batchDeleteByIds/${ids}`)
}

/**
 * 根据id查询
 */

export function updateById(entity) {
    return instance.put(`/colour/`,entity);
}